<!--河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
-->
<template>
  <div class='app-container'>
    <el-form ref="form" :model="s_calendar" :rules="rules" label-width="100px" id="mvcfm">
      <div class="form-unit">
        <span class="mvc-title-left"> 日历 </span>
      </div>
      <table id='calendarTable' cellspacing="0" border="0" class='el-table el-table--fit el-table--enable-row-hover el-table--enable-row-transition'>
        <tbody class="el-table__body">
          <tr v-for="(trrow, trindex) in s_calendar">
            <td v-for="(row, status) in trrow" {{emt.map['Row']==-1?'class=weekName':''}} {{emt.map['Date']==''?'class=noday':''}} {{emt.map['today']==0?'class=today':''}} {{emt.map['Col']==5||emt.map['Col']==6?'class=noday':'class=day'}}>
              <p>
                <el-link @click="gotoPage('/oa/humanresources/BespeakList?CMID='+row.Date+''+vueparams+'')" target=calendardetails type='primary'>{{row.DateTitle}}</el-link>
              </p>
            </td>
          </tr>
        </tbody>
      </table>
    </el-form>
  </div>
</template>
<script>
  import request from '@/utils/request'
  export default {
    name: 'InterviewCount',
    components: {},
    props: ['popparams'],
    data() {
      return {
        vueparams: this.getVUEParams(""),
        s_calendar: [],
        s_year: [],
        s_month: [],
        loading: false,
        rules: {}
      }
    },
    created() {
      this.getData();
    },
    updated() {},
    mounted() {},
    methods: {
      getData() {
        request({
          method: 'get',
          url: '/xcapi/VUEAction/oa/humanresources/InterviewAction/interviewCount?' + this.vueparams,
        }).then(data => {
          for (var k in data) {
            if (Array.isArray(data[k])) {
              this[k] = data[k];
            } else {
              $.extend(this[k], data[k]);
            }
          }
        })
      },
      list_s_year(value) {
        if (this.$route.fullPath.indexOf("?") == -1) {
          this.$router.replace("/redirect" + this.$route.fullPath + "?CMIDSEL1=" + value);
        } else if (this.$route.fullPath.indexOf("CMIDSEL1=") == -1) {
          this.$router.replace("/redirect" + this.$route.fullPath + "&CMIDSEL1=" + value);
        } else {
          this.gotoPage("/redirect/oa/humanresources/InterviewCount?" + this.vueparams, {
            CMIDSEL1: value
          });
        }
      },
      list_s_month(value) {
        if (this.$route.fullPath.indexOf("?") == -1) {
          this.$router.replace("/redirect" + this.$route.fullPath + "?CMIDSEL2=" + value);
        } else if (this.$route.fullPath.indexOf("CMIDSEL2=") == -1) {
          this.$router.replace("/redirect" + this.$route.fullPath + "&CMIDSEL2=" + value);
        } else {
          this.gotoPage("/redirect/oa/humanresources/InterviewCount?" + this.vueparams, {
            CMIDSEL2: value
          });
        }
      },
    },
  }
</script>
